﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VMuktiAPI;

namespace VMuktiGrid.CustomMenu
{
    /// <summary>
    /// Interaction logic for addBuddy.xaml
    /// </summary>
    public partial class ctlMenuItem : UserControl
    {
        #region Public Properties

        public string Title
        {
            set
            {
                txtTitle.Text = value;
            }
        }

        public string strLeftImage
        {
            set 
            {
                if (value == "")
                {
                    imgLeftIcon.Source = null;
                }
                else
                {
                    imgLeftIcon.Source = new BitmapImage(new Uri(value, UriKind.RelativeOrAbsolute));
                }
            }
        }

        public string strRightImage
        {
            set 
            {
                if (value == "")
                {
                    imgRightIcon.Source = null;
                }
                else
                {
                    imgRightIcon.Source = new BitmapImage(new Uri(value, UriKind.RelativeOrAbsolute));
                }
            }
        }

        #endregion

        public ctlMenuItem()
        {
            try
            {
                InitializeComponent();
                txtTitle.MouseDown += new System.Windows.Input.MouseButtonEventHandler(txtTitle_MouseDown);
            }
            catch (Exception ex)
            {
                ex.Data.Add("My Key", "ctlMenuItem()--:--ctlMenuItem.xaml.cs--:--" + ex.Message + " :--:--");
                ClsException.LogError(ex);
                ClsException.WriteToErrorLogFile(ex);
            }
        }
       
        #region Private Members

        private void txtTitle_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {

        }

        #endregion
    }
}
